<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'file-form',
	'enableAjaxValidation'=>true,
)); ?>

	<?php echo Yii::t('admin','<p class="note">Fields with <span class="required">*</span> are required.</p>');?>	


	<?php echo $form->errorSummary($model); ?>
	<div class="row">
		<?php echo $form->labelEx($model,'file_name'); ?>
		<?php echo $form->textField($model,'file_name',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'file_name'); ?>
	</div>
	
	<div class="row column3">
		<?php echo $form->labelEx($model,'file_pid'); ?>
		<?php echo $form->dropDownList($model,'file_pid',Product::model()->generateProductList(),array(
							'options'=>array($model->file_pid=>array('selected'=>true))
		)); ?>
		<?php echo $form->error($model,'file_pid'); ?>
	</div>

	<div class="row column3">
		<?php echo $form->labelEx($model,'file_status'); ?>
		<?php echo $form->dropDownList($model,'file_status',File::model()->generateFileStatusDropdownListArray(),array(
							'options'=>array($model->file_status=>array('selected'=>true)))); ?>
		<?php echo $form->error($model,'file_status'); ?>
	</div>
	
	<div class="row column3">
		<?php echo $form->labelEx($model,'file_type'); ?>
		<?php echo $form->dropDownList($model,'file_type',Category::model()->generateContentTypeDropdownListArray(),array(
							'options'=>array($model->file_type=>array('selected'=>true))
		)); ?>
		<?php echo $form->error($model,'file_type'); ?>
	</div>
	
	<div class="clear"></div>

	<div class="row">
		<?php echo $form->labelEx($model,'file_tag'); ?>
		<?php echo $form->textField($model,'file_tag',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'file_tag'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'file_links'); ?>
		<?php echo $form->textField($model,'file_links',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'file_links'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'file_remark'); ?>
		<?php echo $form->textArea($model,'file_remark',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'file_remark'); ?>
	</div>

	<div class="row buttons">
		<?php $this->widget('zii.widgets.jui.CJuiButton',
				array(
					'name'=>'button',
					'buttonType'=>'button',
					'htmlOptions'=>array(
						'id'=>'file_submit'
					),
					'caption'=>$model->isNewRecord ? 'Create' : 'Save',
					///'onclick'=>'js:function(){alert("Save button clicked"); this.blur(); return false;}',
				)
			);
		?>
	</div>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->